//package com.jindianjichi.subject.application.interceptor;
//
//import org.apache.commons.lang3.StringUtils;
//import org.springframework.stereotype.Component;
//import org.springframework.web.context.request.RequestContextHolder;
//import org.springframework.web.context.request.ServletRequestAttributes;
//
//import javax.servlet.http.HttpServletRequest;
//import java.util.Objects;
//
///**
// * Feign请求拦截器
// *
// * @author: ChickenWing
// * @date: 2023/12/3
// */
//@Component
//public class FeignRequestInterceptor implements RequestInterceptor {
//
//    @Override
//    public void apply(RequestTemplate requestTemplate) {
//        ServletRequestAttributes requestAttributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
//        HttpServletRequest request = requestAttributes.getRequest();
//        if (Objects.nonNull(request)) {
//            String loginId = request.getHeader("loginId");
//            if (StringUtils.isNotBlank(loginId)) {
//                requestTemplate.header("loginId", loginId);
//            }
//        }
//    }
//
//}
